<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/boost/core/explicit_operator_bool.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">usr/include/boost/core</a> - explicit_operator_bool.hpp<span style="font-size: 80%;"> (source / <a href="explicit_operator_bool.hpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">1</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:50:33</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">1</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : /*</a>
<span class="lineNum">       2 </span>            :  *          Copyright Andrey Semashev 2007 - 2013.
<span class="lineNum">       3 </span>            :  * Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       4 </span>            :  *    (See accompanying file LICENSE_1_0.txt or copy at
<span class="lineNum">       5 </span>            :  *          http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       6 </span>            :  */
<span class="lineNum">       7 </span>            : 
<span class="lineNum">       8 </span>            : /*!
<span class="lineNum">       9 </span>            :  * \file   explicit_operator_bool.hpp
<span class="lineNum">      10 </span>            :  * \author Andrey Semashev
<span class="lineNum">      11 </span>            :  * \date   08.03.2009
<span class="lineNum">      12 </span>            :  *
<span class="lineNum">      13 </span>            :  * This header defines a compatibility macro that implements an unspecified
<span class="lineNum">      14 </span>            :  * \c bool operator idiom, which is superseded with explicit conversion operators in
<span class="lineNum">      15 </span>            :  * C++11.
<span class="lineNum">      16 </span>            :  */
<span class="lineNum">      17 </span>            : 
<span class="lineNum">      18 </span>            : #ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
<span class="lineNum">      19 </span>            : #define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
<span class="lineNum">      20 </span>            : 
<span class="lineNum">      21 </span>            : #include &lt;boost/config.hpp&gt;
<span class="lineNum">      22 </span>            : 
<span class="lineNum">      23 </span>            : #ifdef BOOST_HAS_PRAGMA_ONCE
<span class="lineNum">      24 </span>            : #pragma once
<span class="lineNum">      25 </span>            : #endif
<span class="lineNum">      26 </span>            : 
<span class="lineNum">      27 </span>            : #if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
<span class="lineNum">      28 </span>            : 
<span class="lineNum">      29 </span>            : /*!
<span class="lineNum">      30 </span>            :  * \brief The macro defines an explicit operator of conversion to \c bool
<span class="lineNum">      31 </span>            :  *
<span class="lineNum">      32 </span>            :  * The macro should be used inside the definition of a class that has to
<span class="lineNum">      33 </span>            :  * support the conversion. The class should also implement &lt;tt&gt;operator!&lt;/tt&gt;,
<span class="lineNum">      34 </span>            :  * in terms of which the conversion operator will be implemented.
<span class="lineNum">      35 </span>            :  */
<span class="lineNum">      36 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">      37 </span>            :     BOOST_FORCEINLINE explicit operator bool () const\
<span class="lineNum">      38 </span>            :     {\
<span class="lineNum">      39 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">      40 </span>            :     }
<span class="lineNum">      41 </span>            : 
<span class="lineNum">      42 </span>            : /*!
<span class="lineNum">      43 </span>            :  * \brief The macro defines a noexcept explicit operator of conversion to \c bool
<span class="lineNum">      44 </span>            :  *
<span class="lineNum">      45 </span>            :  * The macro should be used inside the definition of a class that has to
<span class="lineNum">      46 </span>            :  * support the conversion. The class should also implement &lt;tt&gt;operator!&lt;/tt&gt;,
<span class="lineNum">      47 </span>            :  * in terms of which the conversion operator will be implemented.
<span class="lineNum">      48 </span>            :  */
<span class="lineNum">      49 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
<span class="lineNum">      50 </span>            :     BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\
<span class="lineNum">      51 </span>            :     {\
<span class="lineNum">      52 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">      53 </span>            :     }
<span class="lineNum">      54 </span>            : 
<span class="lineNum">      55 </span>            : /*!
<span class="lineNum">      56 </span>            :  * \brief The macro defines a constexpr explicit operator of conversion to \c bool
<span class="lineNum">      57 </span>            :  *
<span class="lineNum">      58 </span>            :  * The macro should be used inside the definition of a class that has to
<span class="lineNum">      59 </span>            :  * support the conversion. The class should also implement &lt;tt&gt;operator!&lt;/tt&gt;,
<span class="lineNum">      60 </span>            :  * in terms of which the conversion operator will be implemented.
<span class="lineNum">      61 </span>            :  */
<span class="lineNum">      62 </span>            : #define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">      63 </span>            :     BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\
<span class="lineNum">      64 </span>            :     {\
<span class="lineNum">      65 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">      66 </span>            :     }
<span class="lineNum">      67 </span>            : 
<span class="lineNum">      68 </span>            : #else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
<span class="lineNum">      69 </span>            : 
<span class="lineNum">      70 </span>            : #if (defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt;= 0x530)) &amp;&amp; !defined(BOOST_NO_COMPILER_CONFIG)
<span class="lineNum">      71 </span>            : // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
<span class="lineNum">      72 </span>            : #define BOOST_NO_UNSPECIFIED_BOOL
<span class="lineNum">      73 </span>            : #endif // (defined(__SUNPRO_CC) &amp;&amp; (__SUNPRO_CC &lt;= 0x530)) &amp;&amp; !defined(BOOST_NO_COMPILER_CONFIG)
<span class="lineNum">      74 </span>            : 
<span class="lineNum">      75 </span>            : #if !defined(BOOST_NO_UNSPECIFIED_BOOL)
<span class="lineNum">      76 </span>            : 
<span class="lineNum">      77 </span>            : namespace boost {
<span class="lineNum">      78 </span>            : 
<span class="lineNum">      79 </span>            : namespace detail {
<span class="lineNum">      80 </span>            : 
<span class="lineNum">      81 </span>            : #if !defined(_MSC_VER) &amp;&amp; !defined(__IBMCPP__)
<span class="lineNum">      82 </span>            : 
<span class="lineNum">      83 </span>            :     struct unspecified_bool
<span class="lineNum">      84 </span>            :     {
<span class="lineNum">      85 </span>            :         // NOTE TO THE USER: If you see this in error messages then you tried
<span class="lineNum">      86 </span>            :         // to apply an unsupported operator on the object that supports
<a name="87"><span class="lineNum">      87 </span>            :         // explicit conversion to bool.</a>
<span class="lineNum">      88 </span>            :         struct OPERATORS_NOT_ALLOWED;
<span class="lineNum">      89 </span><span class="lineNoCov">          0 :         static void true_value(OPERATORS_NOT_ALLOWED*) {}</span>
<span class="lineNum">      90 </span>            :     };
<span class="lineNum">      91 </span>            :     typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
<span class="lineNum">      92 </span>            : 
<span class="lineNum">      93 </span>            : #else
<span class="lineNum">      94 </span>            : 
<span class="lineNum">      95 </span>            :     // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't
<span class="lineNum">      96 </span>            :     struct unspecified_bool
<span class="lineNum">      97 </span>            :     {
<span class="lineNum">      98 </span>            :         // NOTE TO THE USER: If you see this in error messages then you tried
<span class="lineNum">      99 </span>            :         // to apply an unsupported operator on the object that supports
<span class="lineNum">     100 </span>            :         // explicit conversion to bool.
<span class="lineNum">     101 </span>            :         struct OPERATORS_NOT_ALLOWED;
<span class="lineNum">     102 </span>            :         void true_value(OPERATORS_NOT_ALLOWED*) {}
<span class="lineNum">     103 </span>            :     };
<span class="lineNum">     104 </span>            :     typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
<span class="lineNum">     105 </span>            : 
<span class="lineNum">     106 </span>            : #endif
<span class="lineNum">     107 </span>            : 
<span class="lineNum">     108 </span>            : } // namespace detail
<span class="lineNum">     109 </span>            : 
<span class="lineNum">     110 </span>            : } // namespace boost
<span class="lineNum">     111 </span>            : 
<span class="lineNum">     112 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">     113 </span>            :     BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\
<span class="lineNum">     114 </span>            :     {\
<span class="lineNum">     115 </span>            :         return (!this-&gt;operator! () ? &amp;boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
<span class="lineNum">     116 </span>            :     }
<span class="lineNum">     117 </span>            : 
<span class="lineNum">     118 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
<span class="lineNum">     119 </span>            :     BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
<span class="lineNum">     120 </span>            :     {\
<span class="lineNum">     121 </span>            :         return (!this-&gt;operator! () ? &amp;boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
<span class="lineNum">     122 </span>            :     }
<span class="lineNum">     123 </span>            : 
<span class="lineNum">     124 </span>            : #define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">     125 </span>            :     BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
<span class="lineNum">     126 </span>            :     {\
<span class="lineNum">     127 </span>            :         return (!this-&gt;operator! () ? &amp;boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
<span class="lineNum">     128 </span>            :     }
<span class="lineNum">     129 </span>            : 
<span class="lineNum">     130 </span>            : #else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
<span class="lineNum">     131 </span>            : 
<span class="lineNum">     132 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">     133 </span>            :     BOOST_FORCEINLINE operator bool () const\
<span class="lineNum">     134 </span>            :     {\
<span class="lineNum">     135 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">     136 </span>            :     }
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span>            : #define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
<span class="lineNum">     139 </span>            :     BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\
<span class="lineNum">     140 </span>            :     {\
<span class="lineNum">     141 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">     142 </span>            :     }
<span class="lineNum">     143 </span>            : 
<span class="lineNum">     144 </span>            : #define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
<span class="lineNum">     145 </span>            :     BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\
<span class="lineNum">     146 </span>            :     {\
<span class="lineNum">     147 </span>            :         return !this-&gt;operator! ();\
<span class="lineNum">     148 </span>            :     }
<span class="lineNum">     149 </span>            : 
<span class="lineNum">     150 </span>            : #endif // !defined(BOOST_NO_UNSPECIFIED_BOOL)
<span class="lineNum">     151 </span>            : 
<span class="lineNum">     152 </span>            : #endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
<span class="lineNum">     153 </span>            : 
<span class="lineNum">     154 </span>            : #endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
